package com.lk.ii.service.impl;

import java.util.List;
import com.lk.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lk.ii.mapper.IiUserMapper;
import com.lk.ii.domain.IiUser;
import com.lk.ii.service.IIiUserService;
import com.lk.common.core.text.Convert;

/**
 * 用户Service业务层处理
 * 
 * @author lk
 * @date 2021-02-22
 */
@Service
public class IiUserServiceImpl implements IIiUserService 
{
    @Autowired
    private IiUserMapper iiUserMapper;

    /**
     * 查询用户
     * 
     * @param id 用户ID
     * @return 用户
     */
    @Override
    public IiUser selectIiUserById(Long id)
    {
        return iiUserMapper.selectIiUserById(id);
    }

    /**
     * 查询用户列表
     * 
     * @param iiUser 用户
     * @return 用户
     */
    @Override
    public List<IiUser> selectIiUserList(IiUser iiUser)
    {
        return iiUserMapper.selectIiUserList(iiUser);
    }

    /**
     * 新增用户
     * 
     * @param iiUser 用户
     * @return 结果
     */
    @Override
    public int insertIiUser(IiUser iiUser)
    {
        iiUser.setCreateTime(DateUtils.getNowDate());
        return iiUserMapper.insertIiUser(iiUser);
    }

    /**
     * 修改用户
     * 
     * @param iiUser 用户
     * @return 结果
     */
    @Override
    public int updateIiUser(IiUser iiUser)
    {
        return iiUserMapper.updateIiUser(iiUser);
    }

    /**
     * 删除用户对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteIiUserByIds(String ids)
    {
        return iiUserMapper.deleteIiUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户信息
     * 
     * @param id 用户ID
     * @return 结果
     */
    @Override
    public int deleteIiUserById(Long id)
    {
        return iiUserMapper.deleteIiUserById(id);
    }
}
